import pandas as pd
import glob
target_folder = "/nvmework1/shaonian/Datasets/AudioSet_extracted/"

df = pd.DataFrame(columns=["filename"])
all_files = glob.glob(f"{target_folder}/**/*.wav", recursive=True)

df["filename"] = all_files
df["filename"] = df["filename"].apply(lambda x: x.replace(target_folder, ""))
df.to_csv("train_unlabeled_od.tsv", sep="\t", index=False)